<template>
    <div class="panel minh_624">
        <div class="item_title pr">
            企业信息
            <div class="tools-box" v-show="isedit">
                <router-link to="/company/companyedit" class="displayB">
                    <i class="el-icon-edit-outline"></i>编辑
                </router-link>
            </div>
        </div>
        <div class="padding_16">
            <router-view></router-view>
        </div>
    </div>
</template>
<script>

    export default {
        data(){
            return{
                infoData: {},
                sid: '',
                isedit: true,
            }
        },
        methods: {
            init(){
                
                this.$router.push({
                    path: '/company/companyinfo'
                });

            },
        },
        mounted(){
            this.init();
        },
        watch: {
            $route(to, from){
                
                if(to.path == '/company/companyinfo'){
                    this.isedit = true;
                }else if(to.path == '/company/companyedit'){
                    this.isedit = false;
                }
            },
        },  
    }
</script>
